﻿<wpfc:HostControl x:Class="Sobiens.Connectors.WPF.Controls.Workflow.ItemWorkflowForm"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:wpfc="clr-namespace:Sobiens.Connectors.WPF.Controls"
             mc:Ignorable="d" 
             xmlns:l="clr-namespace:Sobiens.WPF.Controls.UserControls;assembly=Sobiens.WPF.Controls"
             d:DesignHeight="300" d:DesignWidth="508" xmlns:my="clr-namespace:Sobiens.Connectors.WPF.Controls">
    <Grid>
        <Label Content="{DynamicResource Start a New Workflow}" Height="25" HorizontalAlignment="Stretch" Margin="0,0,0,0" Name="WorkflowListLabel" VerticalAlignment="Top" Background="Aqua" FontWeight="Bold" BorderThickness="1" BorderBrush="#FF0080FF" />
        <ListView Name="WorkflowListView" Height="100" MouseDoubleClick="WorkflowListView_MouseDoubleClick" VerticalAlignment="Top" HorizontalAlignment="Stretch" Margin="0,25,0,0" BorderThickness="0" IsEnabled="True">
            <ListView.ItemsPanel>
                <ItemsPanelTemplate>
                    <UniformGrid Columns="2" Height="30" VerticalAlignment="Top" />
                </ItemsPanelTemplate>
            </ListView.ItemsPanel>
            <ListView.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Image Height="22" Width="31" HorizontalAlignment="Left" Name="image1" VerticalAlignment="Top" Source="/Sobiens.Connectors.WPF.Controls;component/Images/availableworkflow.gif" />
                        <Label Content="{Binding Path=Name}" Margin="31,0,0,0" />
                    </Grid>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>

        <Label Content="{DynamicResource Workflows}" Height="25" HorizontalAlignment="Stretch" Margin="0,135,0,0" Name="ActiveWorkflowsListLabel" VerticalAlignment="Top" Background="Aqua" FontWeight="Bold" BorderBrush="#FF0080FF" BorderThickness="1" />
        <ListView Name="ActiveWorkflowsListView" Height="130" Margin="0,170,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Top"
            BorderThickness="0">
            <ListView.GroupStyle>
                <GroupStyle>
                    <GroupStyle.ContainerStyle>
                        <Style TargetType="{x:Type GroupItem}">
                            <Setter Property="Margin" Value="0,0,0,5"/>
                            <Setter Property="Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type GroupItem}">
                                        <Expander IsExpanded="True" BorderBrush="#FFA4B97F" 
                            BorderThickness="0,0,0,1">
                                            <Expander.Header>
                                                <DockPanel>
                                                    <TextBlock FontWeight="Bold" Text="{Binding Path=Name}" 
                                   Margin="5,0,0,0" Width="150"/>
                                                </DockPanel>
                                            </Expander.Header>
                                            <Expander.Content>
                                                <ItemsPresenter />
                                            </Expander.Content>
                                        </Expander>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </GroupStyle.ContainerStyle>
                </GroupStyle>
            </ListView.GroupStyle>
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="{DynamicResource Name}" 
                        DisplayMemberBinding="{Binding Path=Name}" 
                        Width="140" />
                    <GridViewColumn Header="{DynamicResource Started}" 
                        DisplayMemberBinding="{Binding Path=Created}" 
                        Width="100" />
                    <GridViewColumn Header="{DynamicResource Ended}" 
                        DisplayMemberBinding="{Binding Path=Modified}"
                        Width="80" />
                    <GridViewColumn Header="{DynamicResource Status}" 
                        DisplayMemberBinding="{Binding Path=StatusTitle}" 
                        Width="80" />
                </GridView>
            </ListView.View>
        </ListView>

    </Grid>
</wpfc:HostControl>
